﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'usp_UPDMS_COM_PGM_LABEL_Select')
	BEGIN
		DROP Procedure usp_UPDMS_COM_PGM_LABEL_Select
	END
GO

SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
/******************************************************************************
**	Name : usp_UPDMS_COM_PGM_LABEL_Select
**	Desc : 프러그램별 리터럴 정보를 조회한다.
**	Test Exec Query : Exec usp_UPDMS_COM_PGM_LABEL_Select 'Crd1012m', 'ko'
**	Called by : Com_Dac_UPDMS_COM_PGM_LABEL.cs
**	Program ID : Com1018m
**	Auth : 송시명
**	Date : 2011-01-31
*******************************************************************************
**	Change History
*******************************************************************************
**	Date:		Author:		Description:
**	--------	--------	---------------------------------------
**	
*******************************************************************************/
CREATE PROC [dbo].[usp_UPDMS_COM_PGM_LABEL_Select]
@ls_pgm_id nvarchar(20)
AS
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
SET NOCOUNT ON

SELECT a.Seq,
       a.Pgm_Id,
       a.Ctrl_Id,
       a.Label_Id,
       b.Label_Ko,
       b.Label_En,
       b.Label_Ch
  FROM UPDMS_COM_PGM_LABEL AS a WITH(NOLOCK)
  JOIN UPDMS_COM_LABEL AS b WITH(NOLOCK) ON a.Label_Id = b.Seq
 WHERE a.Pgm_Id = @ls_pgm_id
 ORDER BY a.Ctrl_Id
 
GO